package com.mifengkong.cygtools.model;

import com.mifengkong.cygtools.constant.ServletAddressConstant;
import com.mifengkong.cygtools.jjcard.CashByCreditCardBean;
import com.mifengkong.frtools.http.request.HttpFunction;

import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2018/1/23
 */

public class KaMaoModel extends BaseModel {

    public static KaMaoModel getInstance() {
        return getPresent(KaMaoModel.class);
    }

    public void execute(Observer<CashByCreditCardBean> observer) {
        addParamStrings("is_jifen", "0");
        Observable<CashByCreditCardBean> observable = mServletApi.getDefaultCreditCard(mParams).map(new HttpFunction<CashByCreditCardBean>());
        toSubscribe(observable, observer);
    }

    @Override
    protected String getDoMainType() {
        return ServletAddressConstant.KA_MAO;
    }
}